<?php

/**
 * to_dbput
 * to_dbget
 * to_etc
 * to_handle
 * to_look
 * to_mod
 * to_public
 * to_ut
 * to_util
 * to_other
 * to_tpl
 **/

function to_mod($mod,$file,$ftype='') {
  $mdir = $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['MOD_DIR']. DS ;
  if(!$ftype)
    $ftype = $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['PHP_FILE_TYPE'];
 
  return $mdir . $mod.DS.$file. $ftype;
}
function to_util($mod,$file) {
  $udir = $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['UTIL_DIR']. DS ;
  $ftype = $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['PHP_FILE_TYPE'];
  
  if( $mod )
    return $udir . $mod.DS.$file. $ftype;
  else
    return $udir . $file . $ftype;
}
function to_dbput($mod,$file,$db='default') {
  $dbdir =  $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['DB_DIR'] .DS. $GLOBALS["${GLOBALS['PRIFAKX']}DB"][$db]['path']. DS .
                   $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['DB_PUT_DIR'] .DS; 
  $ftype = $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['PHP_FILE_TYPE'];

  if( $mod )
    return $dbdir . $mod.DS.$file. $ftype;
  else
    return $dbdir . $file . $ftype;
}
function to_dbget($mod,$file,$db='default') {
  $dbdir =  $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['DB_DIR'] .DS. $GLOBALS["${GLOBALS['PRIFAKX']}DB"][$db]['path']. DS .
                   $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['DB_GET_DIR'] .DS; 
  $ftype = $GLOBALS["${GLOBALS['PRIFAKX']}NAV"]['PHP_FILE_TYPE'];

  if( $mod )
    return $dbdir . $mod.DS.$file. $ftype;
  else
    return $dbdir . $file . $ftype;
}

?>
